package com.izobnehc.rabbit.rabbitframework.common.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageResult<T> extends Result<T> {

    private PageInfo page;

    public PageResult(Result<T> result, PageInfo page) {
        super(result.getCode(), result.getMessage(), result.getData());
        this.page = page;
    }
}
